
namespace <?=strtolower($namespace)?>;

use <?=$extendClass?>;
use app\common\traits\ModelTrait;
use app\common\utils\JsonService;
/**
* This is the model class for table "{<?=$tableName?>}".
*
<?php foreach($comment_fields as $k=>$v){?>
<?php if(in_array($v['DATA_TYPE'],['int','mediumint','tinyint','decimal','smallint'])){?>
* @property int $<?=$v['COLUMN_NAME']?> <?=$v['COLUMN_COMMENT']?> <?="\r\n"?>
<?php }else if(in_array($v['DATA_TYPE'],['char','varchar','text','mediumtext','longtext'])){?>
* @property string $<?=$v['COLUMN_NAME']?> <?=$v['COLUMN_COMMENT']?><?="\r\n"?>
<?php }else{?>
* @property int $<?=$v['COLUMN_NAME']?> <?=$v['COLUMN_COMMENT']?><?="\r\n"?>
<?php }} ?>
*/
class <?=$tpName?> extends <?=basename($extendClass)?>
{

    protected $pk = '<?=$pri?>';
    protected $name = '<?=$oriTableName?>';

    use ModelTrait;
    protected $autoWriteTimestamp = true;
    //protected $dateFormat = 'Y-m-d';
    //protected $createTime = 'create_time';
    //protected $updateTime = 'update_time';

    /**
    * {@inheritdoc}
    */
    public function attributeLabels()
    {
        return [
<?php foreach($table_fields as $k=>$v){?>
            '<?=$v['Field']?>' => '<?=$v['Comment']?>',
<?php } ?>
        ];
    }

}


